<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<h:body>
<h:form>
<h:dataTable value="#{cliBean.clientes}" var="dados">
	<h:column>
		<f:facet name="header">
			<h:outputText value="Código"></h:outputText>
		</f:facet>
		<h:outputText value="#{dados.id}"></h:outputText>
	</h:column>
	<h:column>
		<f:facet name="header">
			<h:outputText value="Nome"></h:outputText>
		</f:facet>
		<h:outputText value="#{dados.nome}"></h:outputText>
	</h:column>
	<h:column>
		<f:facet name="header">
			<h:outputText value="Email"></h:outputText>
		</f:facet>
		<h:outputText value="#{dados.email}"></h:outputText>
	</h:column>
	<h:column>
		<f:facet name="header">
			<h:outputText value="Idade"></h:outputText>
		</f:facet>
		<h:outputText value="#{dados.idade}"></h:outputText>
	</h:column>
	<h:column>
		<f:facet name="header">
			<h:outputText value="Ações"></h:outputText>
		</f:facet>
			<h:commandButton value="[EDITAR]" action="update" actionListener="#{cliBean.selecionarReg}"></h:commandButton>
			<h:commandButton value="[DELETAR]" action="delete" actionListener="#{cliBean.selecionarReg}"></h:commandButton>
	</h:column>
</h:dataTable>
<h:commandLink value="Novo Cliente" action="index" actionListener="#{cliBean.novoReg}"></h:commandLink>
</h:form>
</h:body>
</html>